package com.it.schoolbookshop_back.service;

import com.it.schoolbookshop_back.entities.po.User;
import com.it.schoolbookshop_back.entities.vo.user.UserResetPwd;
import com.it.schoolbookshop_back.entities.vo.user.UserStatistics;
import com.it.schoolbookshop_back.entities.vo.user.UserUpdateRole;
import com.it.schoolbookshop_back.entities.vo.user.UserUpdateStatus;
import com.it.schoolbookshop_back.utils.PageBean;

public interface AdminUserManageService {
    PageBean<User> getUserInform(Integer page, Integer limit, String query, String status, String role, String sortBy);

    User getUserDetail(int id);

    UserUpdateStatus updateUserStatus(int id, String status);

    UserResetPwd resetUserPassword(int id, String resetPassword);

    UserUpdateRole updateUserRole(int id, String role);

    UserStatistics getUserStatistics();
    
    /**
     * 删除用户
     * @param id 用户ID
     * @return 是否删除成功
     */
    boolean deleteUser(int id);
    
    /**
     * 删除用户发布的所有书籍
     * @param userId 用户ID
     * @return 是否删除成功
     */
    boolean deleteUserBooks(int userId);
}
